using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.OleDb;
using DAO;
using DTO;

namespace BUS
{
    public class PhongBUS
    {
        public DataTable TimPhong(PhongDTO p)
        {
            PhongDAO  pdao = new PhongDAO (); 
            DataTable dt = pdao.TimPhong(p);
            return dt;
        }
        public DataTable TraCuuPhong(string sql)
        {
            PhongDAO pdao=new PhongDAO();
            DataTable dt = pdao.TraCuuPhong(sql);
            return dt;
        }
        public void Them(PhongDTO pdto)
        {
            PhongDAO pdao = new PhongDAO();
            pdao.Them(pdto);
        }
        public DataTable LayMaxMa()
        {
            PhongDAO pdao = new PhongDAO();
            return pdao.LayMaxMa();
        }
        public void Sua(PhongDTO pdto)
        {
            PhongDAO pdao = new PhongDAO();
            pdao.Sua(pdto);
        }
        public void Xoa(int map)
        {
            PhongDAO pdao = new PhongDAO();
            pdao.Xoa(map);
        }
        public void CapNhatTinhTrang(DataTable dt, string sql)
        {
            PhongDAO pdao = new PhongDAO();
            pdao.CapNhatTinhTrang(dt, sql);
        }
        public void CapNhat(PhongDTO pdto)
        {
            PhongDAO pdao = new PhongDAO();
            pdao.CapNhat(pdto);
        }
    }
}
